package me.feng.service

import me.feng.dao.impl.MemberDao
import me.feng.domain.Member

class MemberService extends BaseService{

  private val dao = new MemberDao(getSession)
  
  def getMemberbyUsername(username:String):Member= withTransaction{
    dao.getMemberbyUsername(username)
  }
  
  def getMemberbyUid(uid:String):Member =withTransaction{
    dao.getMemberbyUid(uid)
  }
  
  def saveMember(m:Member) = withTransaction{
    dao.save(m)
    m
  }
}